import React, { useEffect, useState } from 'react'
import Tabbar from './components/Tabbar'
import MyRouter from './indexRouter/index'
import store from './redux/store'

export default function App() {
  const [show, setshow] = useState(true)
  useEffect(()=>{
    store.subscribe(()=>{
      setshow(store.getState().TabbarReducer.control)
    })
  },[])
  return (
    <div>
        <MyRouter>
          {show && <Tabbar></Tabbar>}
        </MyRouter>
    </div>
  )
}
